/**
 *  Copyright (C) 2007-2008 Marcos Diez < marcos AT unitron.com.br >
 *  Copyright (C) 2007 PGT-Linux.org http://www.pgt-linux.org
 *  Author: vandorpe Olivier <vandorpeo@pgt-linux.org>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef _FIFOAPI_H_
#define _FIFOAPI_H_

// THIS FILE CONTAINS THE WHOLE API FROM THIS DAEMON WITH AN EXTERNAL CLIENT (as far as I know, only kb2kskype)


// INPUT COMMANDs (i.e. commands the daemon understand )
// note: from now on, after every after every command, one MUST send a \n.


#define FIFO_READ_SWITH_TO_USB 	    	"SWITCH U"	// you may also send a "SWITCH USB" if you want
#define FIFO_READ_SWITH_TO_PSTN 		"SWITCH P"	// you may also send a "SWITCH USB" if you want
#define FIFO_READ_RING             		"RING"  	// an integer may be accepted here
// #define FIFO_READ_QUIT             		"Q"		// quitting the daemon is a security DoS
#define FIFO_READ_TONE             		"TONE" 
#define FIFO_READ_DIALTONE_ON       	"DIALTONE ON"
#define FIFO_READ_DIALTONE_OFF     		"DIALTONE OFF"
#define FIFO_READ_INFO					"INFO"         	// shows device type and serial number 
#define FIFO_READ_PICKUP_PSTN       	"PICKUP_PSTN"  	// it holds the line, to make it is busy for an external PSTN call
#define FIFO_READ_HANDUP_PSTN       	"HANGUP_PSTN"  	// the oposite as above
#define FIFO_READ_JOIN_USB_AND_PSTN     "JOIN_USB_AND_PSTN" /*	// b3g only
							    // joins the USB Audio device with the PSTN line.
							    // that allows call divert, answearing machine and so on		
							    // must be called after PICKUP_PSTN
							    */
#define FIFO_READ_DETACH_USB_AND_PSTN   "DETACH_USB_AND_PSTN" // oposite as above, b3g only
// --- added by chris at lunarflow.com 05/08/2008 ---
#define FIFO_READ_CID_AUDIO_ON          "CIDAUDIO ON"  	// 
#define FIFO_READ_CID_AUDIO_OFF         "CIDAUDIO OFF"  // 



// internal use
#define FIFO_READ_BIGTEST				"BIGTEST"      // whaterever I am testing now. don't use it!
#define FIFO_READ_API_DEBUG             "d" 


// OUTPUT COMMANDS i.e. messages the daemon sends to the client

#define FIFO_SAY_PSTN_RING              "PSTN_RING\n" 
#define FIFO_SAY_HANDSET_ON				"HANDSET ON\n"
#define FIFO_SAY_HANDSET_OFF			"HANDSET OFF\n"
#define FIFO_SAY_KEY_NUM				"KEY  %.2x\n"
#define FIFO_SAY_USB_NOT_FOUND			"USB NOT FOUND\n"
#define FIFO_SAY_USB_DEVICE_FOUND		"USB DEVICE FOUND %d/%d\n"
#define FIFO_SAY_USB_DEVICE_INIT_ERROR	"USB DEVICE INIT ERROR\n"
#define FIFO_SAY_VERSION                "USBB2K %5.2f Bus %03d/%03d DeviceVersion: %5s [0x%x] Serial: "  "%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x\n"
#define FIFO_SAY_DEVICE_REMOVED			"DEVICE REMOVED\n"
#define FIFO_SAY_DAEMON_SHUTDOWN		"DAEMON SHUTDOWN\n"


enum { CMD_NA ,
       CMD_SWITCH_USB ,
       CMD_SWITCH_PSTN ,
       CMD_RING ,
       // --- added by ant@loadtrax.com 30/10/2005 ---
       CMD_TONE , 
       // ---

       // added by simon dible 08-01-07
       //dial tone command signals
       CMD_DIALTONE_ON ,
       CMD_DIALTONE_OFF ,
       // end add

       // added by marcos diez 2007-09-23
       CMD_INFO ,

       CMD_PICKUP_PSTN , 
       CMD_HANGUP_PSTN , 

       CMD_JOIN_USB_AND_PSTN,
       CMD_DETACH_USB_AND_PSTN , 
       CMD_API_DEBUG ,
       
       CMD_BIGTEST ,
       // end add
       // --- added by chris at lunarflow.com 05/08/2008 ---
       CMD_CID_AUDIO_ON ,
       CMD_CID_AUDIO_OFF ,
       
       MAX_CMD_VALUE 
};


#endif 
